
const getNumberOfDaysInMonth = (date) => {
  date = new Date(date)
  // 切换到下个月
  const nextMonth = date.setMonth(date.getMonth()+1)
  // 设置时间为本月的最后一天
  const lastDay = new Date(nextMonth).setDate(0)
  const daysNumber = new Date(lastDay).getDate()
  return daysNumber
}
export {
  getNumberOfDaysInMonth
}
